Use `dd` linux program to save / recover a disk's MBR

Posted by Graduate on Super User See other posts from Super User or by Graduate
Published on 2012-09-16T06:28:56Z Indexed on 2012/09/16 9:40 UTC
Read the original article Hit count: 153

Filed under:
|
|
|

I have an Ubuntu OS installed on my laptop. I want to install Windows 7 as well to another disk partition (I will do it by recovering it from a special partition on my laptop).

After installing Windows, I want to recover my hard drive MBR to be able to load Ubuntu. I have a plan to use linux dd program:

1) (Before installing, perform this command in Linux) dd if=/dev/sda of=/home/user/mbr_backup bs=512 count=1

2) (after installing, load Ubuntu Live CD and launch this) dd if=/home/user/mbr_backup of=/dev/sda bs=512 count=1

3) Load Ubuntu on PC and re-configure the GRUB2 to be able start Windows

I need your advice, I want to be sure I won't damage the disk (it's partition table).

© Super User or respective owner

Related posts about linux

Related posts about recovery